/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package plan;

import java.util.Date;

/**
 *
 * @author phucan
 */
public class Event {

    int id;
    Date date;
    int hour;
    int minute;
    String shortContent;
    String content;
    EventType type;
    int period;

    public Event(int id, Date date, int hour, int minute, String shortContent, EventType type) {
        this.id = id;
        this.date = date;
        this.hour = hour;
        this.minute = minute;
        this.shortContent = shortContent;
        this.type = type;
    }

    public Event(int id, Date date, int hour, int minute, EventType type) {
        this.id = id;
        this.date = date;
        this.hour = hour;
        this.minute = minute;
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public int getMinute() {
        return minute;
    }

    public void setMinute(int minute) {
        this.minute = minute;
    }

    public String getShortContent() {
        return shortContent;
    }

    public void setShortContent(String shortContent) {
        this.shortContent = shortContent;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public EventType getType() {
        return type;
    }

    public void setType(EventType type) {
        this.type = type;
    }

    public int getPeriod() {
        return period;
    }

    public void setPeriod(int period) {
        this.period = period;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (obj instanceof Event) {
            return id == ((Event) obj).id;
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 67 * hash + this.id;
        return hash;
    }

}
